import { get } from './requestApi'

const BASE_URL = '/api/projectShuiLi/'

const API_URL = {
  GET_PROJECTS: 'getProjects', // 分页查询
  GET_PROJECT_COUNT: 'getProjectCount',  //  统计搜索项目数量
  GET_PROJECT_TYPES: 'getProjectTypes',  //  获取项目类别
  GET_DISTRICTS: 'getDistricts',  //  获取行政地区
  GET_PROJECT_DETAIL: 'getProjectDetail',  //  获取详情


}

for (const i in API_URL) {
  API_URL[i] = BASE_URL + API_URL[i]
}

/**
 * 分页查询项目列表
 * @param query
 * @returns {*}
 */
export function getProjects(query) {
  return get(API_URL.GET_PROJECTS, query)
}
/**
 * 统计搜索项目数量
 * @param query
 * @returns {*}
 */
export function getProjectCount(query) {
  return get(API_URL.GET_PROJECT_COUNT, query)
}
/**
 * 获取项目类别
 * @param query
 * @returns {*}
 */
export function getProjectTypesWater(query) {
  return get(API_URL.GET_PROJECT_TYPES, query)
}
/**
 * 获取
 * @param query
 * @returns {*}
 */
export function getDistrictsWater(query) {
  return get(API_URL.GET_DISTRICTS, query)
}
/**
 * 获取
 * @param query
 * @returns {*}
 */
export function getProjectDetail(query) {
  return get(API_URL.GET_PROJECT_DETAIL, query)
}